chrome.extension.onMessage.addListener(
  function(request, sender, sendResponse) {
  if (request.action == 'click') {
    var record = localStorage.getItem("record");
    record = record ? JSON.parse(record) : [];
    record.push(request.data)
    localStorage.setItem("record", JSON.stringify(record));
  }
});
